\(\int (a+b x^n)^p \, dx\) [316]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [C] (verification not implemented)
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 9, antiderivative size = 46 \[ \int \left (a+b x^n\right )^p \, dx=x \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {1}{n},-p,1+\frac {1}{n},-\frac {b x^n}{a}\right ) \]

[Out]

x*(a+b*x^n)^p*hypergeom([1/n, -p],[1+1/n],-b*x^n/a)/((1+b*x^n/a)^p)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {252, 251} \[ \int \left (a+b x^n\right )^p \, dx=x \left (a+b x^n\right )^p \left (\frac {b x^n}{a}+1\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {1}{n},-p,1+\frac {1}{n},-\frac {b x^n}{a}\right ) \]

[In]

Int[(a + b*x^n)^p,x]

[Out]

(x*(a + b*x^n)^p*Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*x^n)/a)])/(1 + (b*x^n)/a)^p

Rule 251

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 252

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^FracPart[p]/(1 + b*(x^n/a))^Fra
cPart[p]), Int[(1 + b*(x^n/a))^p, x], x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILt
Q[Simplify[1/n + p], 0] &&  !(IntegerQ[p] || GtQ[a, 0])

Rubi steps \begin{align*} \text {integral}& = \left (\left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p}\right ) \int \left (1+\frac {b x^n}{a}\right )^p \, dx \\ & = x \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b x^n}{a}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00 \[ \int \left (a+b x^n\right )^p \, dx=x \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {1}{n},-p,1+\frac {1}{n},-\frac {b x^n}{a}\right ) \]

[In]

Integrate[(a + b*x^n)^p,x]

[Out]

(x*(a + b*x^n)^p*Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*x^n)/a)])/(1 + (b*x^n)/a)^p

Maple [F]

\[\int \left (a +b \,x^{n}\right )^{p}d x\]

[In]

int((a+b*x^n)^p,x)

[Out]

int((a+b*x^n)^p,x)

Fricas [F]

\[ \int \left (a+b x^n\right )^p \, dx=\int { {\left (b x^{n} + a\right )}^{p} \,d x } \]

[In]

integrate((a+b*x^n)^p,x, algorithm="fricas")

[Out]

integral((b*x^n + a)^p, x)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.94 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00 \[ \int \left (a+b x^n\right )^p \, dx=\frac {a^{\frac {1}{n}} a^{p - \frac {1}{n}} x \Gamma \left (\frac {1}{n}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{n}, - p \\ 1 + \frac {1}{n} \end {matrix}\middle | {\frac {b x^{n} e^{i \pi }}{a}} \right )}}{n \Gamma \left (1 + \frac {1}{n}\right )} \]

[In]

integrate((a+b*x**n)**p,x)

[Out]

a**(1/n)*a**(p - 1/n)*x*gamma(1/n)*hyper((1/n, -p), (1 + 1/n,), b*x**n*exp_polar(I*pi)/a)/(n*gamma(1 + 1/n))

Maxima [F]

\[ \int \left (a+b x^n\right )^p \, dx=\int { {\left (b x^{n} + a\right )}^{p} \,d x } \]

[In]

integrate((a+b*x^n)^p,x, algorithm="maxima")

[Out]

integrate((b*x^n + a)^p, x)

Giac [F]

\[ \int \left (a+b x^n\right )^p \, dx=\int { {\left (b x^{n} + a\right )}^{p} \,d x } \]

[In]

integrate((a+b*x^n)^p,x, algorithm="giac")

[Out]

integrate((b*x^n + a)^p, x)

Mupad [B] (verification not implemented)

Time = 6.46 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.02 \[ \int \left (a+b x^n\right )^p \, dx=\frac {x\,{\left (a+b\,x^n\right )}^p\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{n},-p;\ \frac {1}{n}+1;\ -\frac {b\,x^n}{a}\right )}{{\left (\frac {b\,x^n}{a}+1\right )}^p} \]

[In]

int((a + b*x^n)^p,x)

[Out]

(x*(a + b*x^n)^p*hypergeom([1/n, -p], 1/n + 1, -(b*x^n)/a))/((b*x^n)/a + 1)^p